//
//  HMHolderTextView.swift
//  WeiBo
//
//  Created by apple on 16/6/30.
//  Copyright © 2016年 itheima. All rights reserved.
//

import UIKit

class HMHolderTextView: UITextView {

    // 注意类型
    var holderString: NSString?
    
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code
        
        // 设置一下 占位文字的大小,让占位文字和 TextView的font一样大小
        holderString?.drawAtPoint(CGPointMake(5, 8), withAttributes: [NSFontAttributeName: font!])
        // 注意了: font 必须得有值,没有值就崩溃
    }
    

}
